package com.example.homework3.filter;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;

import java.io.IOException;

@WebFilter(servletNames = {"cookieServlet"})
public class FilterDemo3 implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("cookieDemo的请求被过滤了...");
        chain.doFilter(request,response);
        System.out.println("cookieDemo的响应被过滤了...");
    }
}
